<template>
	<view>
		<view class="state_content">
			<view class="state_img" >
				<view class="state_view" v-if="state == 1">
					<image  style="width: 18vw; height: 18vw;" src="/static/images/importyes.png"></image>
					<view style="color: #707070;margin: 3vh;font-size: .8em;max-width: 80vw;word-wrap: break-word;">{{msgdata}}</view>
				</view>
				<view class="state_view" v-if="state == 0">
					<image  style="width: 18vw; height: 18vw;" src="/static/images/importno.png"></image>
					<span style="color: #d81e06;margin-top: 3vh;">导入失败</span>
				</view>
				
				
				
			</view>
			<view class="state_button">
				<button class="mini-btn" type="default" size="mini" @click="goIndex">返回首页</button>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				state: 1,
				msgdata: '导入成功'
			}
		},
		onLoad(e) {
			this.state = e.state
			this.msgdata = e.msgdata
			// console.log(e.msgdata)
		  },
		methods: {
			 goIndex(){
				 // console.log('1111111')
				 uni.reLaunch({
				 	url: '/pages/index/index'
				 });
			 }
		}
	}
</script>

<style>
	.state_content{
		width: 100vw;
		height: 50vh;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	
	.state_view{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	
	.state_button{
		margin-top: 10vh;
	}
	.state_button button{
		width: 30vw;
		height: 10vw;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: .8em;
		color: #909399;
		background: #f4f4f5;
		border-color: #d3d4d6;
	}

</style>
